package com.zde.moriserver.config;

import cn.dev33.satoken.exception.NotLoginException;
import com.zde.moriserver.result.Result;
import org.springframework.core.annotation.Order;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 全局异常拦截
 */
@Order(99999)
@RestControllerAdvice
public class SystemExceptionConfiger {


    @ExceptionHandler(NotLoginException.class)
    public Result notLoginException(NotLoginException notLoginException){
        return Result.fail("无权限，请先登录").code(9527);
    }



}
